package org.pzy.java.hutool;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.*;

import java.util.Date;

/**
 * @Author: DRevelation
 * @Date: 2022/10/25 15:56
 */
public class DateUtilTest {
    public static void main(String[] args) {
//        long currentSeconds = DateUtil.second(new Date());
//        System.out.println(currentSeconds);
//
//        DateTime dateTime = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -1);
//        String format = DateUtil.format(dateTime, DatePattern.NORM_DATE_PATTERN);
//        System.out.println("format = " + format);

//        System.out.println(DateUtil.parseDateTime("2023-10-26 16:50:00"));
        long delayTime = DateUtil.between(new Date(), DateUtil.parseDateTime("2023-11-02 14:55:00"),
                 DateUnit.MS, false);
        System.out.println(delayTime);

//        System.out.println(DateUtil.parseDateTime("Mon Oct 30 16:13:27 CST 2023"));


    }
}
